<!doctype html public "-//w3c//dtd html 4.0 transitional//en">


<!-- WARNING! This file is generated. -->
<!-- To alter documentation, edit files in src directory -->


<html><head>
<title>Create and Run a Test Suite</title>
<link rel="stylesheet" href="utplsql.css" content="text/css">
<meta name="keywords" content="utPLSQL, PL\SQL, Unit Testing, Framework, Oracle"/>
<meta name="description" content="Unit Testing PL\SQL"/>
<meta name="title" content="Create and Run a Test Suite"/>
<meta name="author" content="Steven Feuerstein, Chris Rimmer, Patrick Barel"/>
<meta name="copyright" content="(C) 2000-2005 Steven Feuerstein, Chris Rimmer, Patrick Barel"/>
</head><body>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" border=0></a></div>
<p>[ <A href="index.html">Home</A>
 | <A href="started.html">Getting Started</A>
 | <A href="buildpack.html">Build Test Packages</A>
 | <A href="examples.html">Examples</A>
 | <A href="userguide.html">User Guide</A>
 | <A href="release.html">Release Notes</A>
 | <A href="map.html">Document Map</A> ]</p>
<p><A href="prefix.html">&lt; Previous Section: Use Non-Default Prefix</A> | <A href="userguide.html">Next Section: User Guide &gt;</A></p>
<!-- Begin utPLSQL Body -->
<!-- $Id: suite.html,v 1.3 2002/07/25 12:24:57 chrisrimmer Exp $ -->
<h1>
Create and Run a Test Suite</h1>

<p>Usually our applications are composed of multiple packages. To test
our application, we must test all of the packages. utPLSQL makes it easier
for you to do that by offering <a href="defsuite.html">test suites</a>.
<p>Here is an example of a script that defines a (partial) test suite for
PL/Vision, a code library available from <a href="http://www.revealnet.com">RevealNet</a>
as part of its Active PL/SQL Knowledge Base:
<pre>/*file plvision.tst */
BEGIN
   -- Define a test suite for PL/Vision
   utsuite.add ('PLVision');
   
   -- Add packages for testing
   utpackage.add (
      'PLVision', 'PLVstr', dir_in =&gt; 'e:\openoracle\utplsql\examples');
   utpackage.add (
      'PLVision', 'PLVdate', dir_in =&gt; 'e:\openoracle\utplsql\examples');
END;   
/</pre>
This is a very simple test suite definition. I rely on all defaults, but
I specify a location for my test package code. By doing this, utPLSQL will
be able to find my test packages even if the default/current utPLSQL directory
is set to another location.
<p>If I want to, I can also specify the order in which packages are tested
by passing a value for the seq_in argument. I can request that the test
code be looked for in the same package as the source code, and so on. Here
is a rewriting of the above sutie creation script that demonstrates these
options:
<pre>BEGIN
   utsuite.add ('PLVision');

   utpackage.add ('PLVision',
      'PLVstr',
      dir_in =&gt; 'e:\openoracle\utplsql\examples',
      seq_in =&gt; 1,
      samepackage_in =&gt; TRUE
   );

   utpackage.add ('PLVision',
      'PLVdate',
      dir_in =&gt; 'e:\openoracle\utplsql\examples',
      seq_in =&gt; 2,
      samepackage_in =&gt; TRUE
   );
END;
/</pre>

<!-- End utPLSQL Body -->
<p><A href="prefix.html">&lt; Previous Section: Use Non-Default Prefix</A> | <A href="userguide.html">Next Section: User Guide &gt;</A></p>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" border=0></a></div>
<p class="copyright">Copyright (C) 2000-2005 <A href="mailto:steven@stevenfeuerstein.com">Steven Feuerstein<A>, <A href="mailto:c@24.org.uk">Chris Rimmer<A>, <A href="mailto:pbarel@vda.nl">Patrick Barel<A> All rights reserved</p>
</body></html>